<html>
   <head>
      <link rel="stylesheet" type="text/css" href="style.css" />
   </head>
   <body onload="">
<h2 class="comptitle">Network <i>CSMAMac</i></h2>
<b>Package:</b> org.mixim.examples.CSMAMac<br/><b>File: <a href="examples-CSMAMac-CSMAMac.ned.html">examples/CSMAMac/CSMAMac.ned</a></b><br/>
<p>This example shows how to use MiXiMs CSMA protocol implementation.</p>
<p>The network consists of a number of hosts which represent some kind of switches
and a number of hosts which represent clients. At first they build up their
routing tables by sending, forwarding (only switches), receiving and
evaluating "Hello World" messages. After that phase the clients start randomly
"jabbering" with other hosts and the switches only forward the "Jabber"
messages to their destination.</p>
<p>The phy layer uses only "SimplePathlossModel" as AnalogueModel and 
"SNRThresholdDecider" as Decider.</p>
<p>The omnetpp.ini contains the following configurations:</p>
  <ul><li>"General" 			- three clients in range of each other, no switch, no 
						  propagation	delay</li>
  <li>"WithoutPropDelay" 	- four clients and two switches whereas the switches are
						  in range of each other and the clients are in range of at
						  least one switch, no propagation delay</li>
  <li>"WithPropDelay"		- same but with propagation delay</li>
  <li>"CollissionMac"		- same configuration but the parameters for the <a href="org.mixim.modules.mac.CSMAMacLayer.html">CSMAMacLayer</a>
						  lead to more collisions</li>
  <li>"Perftest"			- used with CmdEnv for performance testing (time limited)</li></ul>
<img src="org.mixim.examples.CSMAMac.CSMAMac-type.png" ismap="yes" usemap="#type-diagram"/><map name="type-diagram">
<area shape="rect" href="org.mixim.base.modules.BaseWorldUtility.html" title="BaseWorldUtility" alt="BaseWorldUtility" coords="83,23,125,82">
<area shape="rect" href="org.mixim.base.connectionManager.ConnectionManager.html" title="ConnectionManager" alt="ConnectionManager" coords="139,21,266,84">
<area shape="rect" href="org.mixim.examples.CSMAMac.PhyMacHost.html" title="PhyMacHost" alt="PhyMacHost" coords="-2,71,106,134">
</map>
<h3 class="subtitle">Usage diagram:</h3>
<p>The following diagram shows usage relationships between types.
Unresolved types are missing from the diagram. Click <a href="full-ned-usage-diagram.html">here</a> to see the full picture.</p>
<img src="org.mixim.examples.CSMAMac.CSMAMac-usage.png" ismap="yes" usemap="#usage-diagram"/><map name="usage-diagram"><area shape="rect" id="node1" href="org.mixim.examples.CSMAMac.CSMAMac.html" title="Network CSMAMac" alt="" coords="175,6,260,34">
<area shape="rect" id="node2" href="org.mixim.base.connectionManager.ConnectionManager.html" title="Simple Module ConnectionManager" alt="" coords="5,83,144,111">
<area shape="rect" id="node4" href="org.mixim.examples.CSMAMac.PhyMacHost.html" title="Compound Module PhyMacHost" alt="" coords="168,83,267,111">
<area shape="rect" id="node6" href="org.mixim.base.modules.BaseWorldUtility.html" title="Simple Module BaseWorldUtility" alt="" coords="291,83,411,111">
</map>
<h3 class="subtitle">Inheritance diagram:</h3>
<p>The following diagram shows inheritance relationships for this type.
Unresolved types are missing from the diagram. Click <a href="full-ned-inheritance-diagram.html">here</a> to see the full picture.</p>
<img src="org.mixim.examples.CSMAMac.CSMAMac-inheritance.png" ismap="yes" usemap="#inheritance-diagram"/><map name="inheritance-diagram"><area shape="rect" id="node1" href="org.mixim.examples.CSMAMac.CSMAMac.html" title="Network CSMAMac" alt="" coords="5,6,91,34">
</map>
<h3 class="subtitle">Parameters:</h3>
<table class="paramtable">
   <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Default value</th>
      <th>Description</th>
   </tr>
<tr class="local">
   <td width="150">playgroundSizeX</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>x size of the area the nodes are in (in meters)</p>
   </td>
</tr>
<tr class="local">
   <td width="150">playgroundSizeY</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>y size of the area the nodes are in (in meters)</p>
   </td>
</tr>
<tr class="local">
   <td width="150">playgroundSizeZ</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>z size of the area the nodes are in (in meters)</p>
   </td>
</tr>
<tr class="local">
   <td width="150">numHosts</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>total number of hosts in the network</p>
   </td>
</tr>
</table>
<h3 class="subtitle">Properties:</h3>
<table class="paramtable">
   <tr>
      <th>Name</th>
      <th>Value</th>
      <th>Description</th>
   </tr>
<tr>
   <td width="150">isNetwork</td>
   <td width="100"><i></i></td>
   <td></td>
</tr>
<tr>
   <td width="150">display</td>
   <td width="100"><i>bgb=$playgroundSizeX,$playgroundSizeY,white,,;bgp=10,50</i></td>
   <td></td>
</tr>
</table>
<h3 class="subtitle">Unassigned submodule parameters:</h3>
<table class="paramtable">
   <tr>
      <th>Name</th>
      <th>Type</th>
      <th>Default value</th>
      <th>Description</th>
   </tr>
<tr>
   <td><a href="org.mixim.base.modules.BaseWorldUtility.html">world</a>.coreDebug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>debug switch for the base framework</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.base.modules.BaseWorldUtility.html">world</a>.useTorus</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>use the playground as torus?</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.base.modules.BaseWorldUtility.html">world</a>.use2D</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>use a 2-dimensional world?</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.base.connectionManager.ConnectionManager.html">connectionManager</a>.coreDebug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>debug switch for core framework</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.base.connectionManager.ConnectionManager.html">connectionManager</a>.sendDirect</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>send directly to the node or create separate gates for every connection</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.base.connectionManager.ConnectionManager.html">connectionManager</a>.pMax</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>maximum sending power used for this network [mW]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.base.connectionManager.ConnectionManager.html">connectionManager</a>.sat</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>minimum signal attenuation threshold [dBm]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.base.connectionManager.ConnectionManager.html">connectionManager</a>.alpha</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>minimum path loss coefficient</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.base.connectionManager.ConnectionManager.html">connectionManager</a>.carrierFrequency</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>minimum carrier frequency of the channel [Hz]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.base.connectionManager.ConnectionManager.html">connectionManager</a>.drawMaxIntfDist</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120">false</td>
   <td>
<p>should the maximum interference distance be displayed for each node?</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.base.modules.BaseUtility.html">utility</a>.coreDebug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>debug switch for the base framework</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.base.modules.BaseMobility.html">mobility</a>.coreDebug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>debug switch for the core framework</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.base.modules.BaseMobility.html">mobility</a>.x</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>x coordinate of the nodes' position (-1 = random)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.base.modules.BaseMobility.html">mobility</a>.y</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>y coordinate of the nodes' position (-1 = random)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.base.modules.BaseMobility.html">mobility</a>.z</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>z coordinate of the nodes' position (-1 = random)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.base.modules.BaseArp.html">arp</a>.coreDebug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>debug switch for the core framework</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.SimpleNetwLayer.html">net</a>.ip</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.SimpleNetwLayer.html">net</a>.isSwitch</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.SimpleNetwLayer.html">net</a>.maxTtl</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.SimpleNetwLayer.html">net</a>.boredTime</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.coreDebug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>debug switch for core framework</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.recordStats</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120">false</td>
   <td>
<p>enable/disable tracking of statistics (eg. cOutvectors)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.headerLength</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120">0</td>
   <td>
<p>defines the length of the phy header (/preamble)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.usePropagationDelay</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>Should transmission delay be simulated?</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.thermalNoise</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>the strength of the thermal noise [dBm]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.useThermalNoise</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>should thermal noise be considered?</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.analogueModels</td>
   <td width="100">
      <i>xml</i>
   </td>
   <td width="120"></td>
   <td>
<p>Specification of the analogue models to use and their parameters</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.decider</td>
   <td width="100">
      <i>xml</i>
   </td>
   <td width="120"></td>
   <td>
<p>Specification of the decider to use and its parameters</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.sensitivity</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>The sensitivity of the physical layer [dBm]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.maxTXPower</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>The maximum transimission power of the physical layer [mW]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.timeRXToTX</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0</td>
   <td>
<p>switchTimes [s]:</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.timeRXToSleep</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0</td>
   <td>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.timeTXToRX</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0</td>
   <td>   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.timeTXToSleep</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0</td>
   <td>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.timeSleepToRX</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0</td>
   <td>   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.timeSleepToTX</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0</td>
   <td>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.initialRadioState</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120">0</td>
   <td>
<p>state the radio is initially in</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.radioMinAtt</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">1.0</td>
   <td>
<p>radios gain factor (attenuation) while receiving</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.radioMaxAtt</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120">0.0</td>
   <td>
<p>radios gain factor (attenuation) while not receiving</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.nbRadioChannels</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120">1</td>
   <td>
<p>Number of available radio channels. Defaults to single channel radio.</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.phy.PhyLayer.html">phy</a>.initialRadioChannel</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120">0</td>
   <td>
<p>Initial radio channel.</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.notAffectedByHostState</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120">false</td>
   <td>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.coreDebug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120"></td>
   <td>
<p>debug switch</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.headerLength</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>length of the MAC packet header (in bits)</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.debug</td>
   <td width="100">
      <i>bool</i>
   </td>
   <td width="120">false</td>
   <td>
<p>enable debugging for this module</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.slotDuration</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>how long is a slot? [s]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.difs</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>maximum time between a packet and its ack [s]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.maxTxAttempts</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>maximum number of transmission attempts</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.queueLength</td>
   <td width="100">
      <i>int</i>
   </td>
   <td width="120"></td>
   <td>
<p>length of the MAC queue</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.defaultChannel</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>default channel</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.bitrate</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>bit rate [bps]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.txPower</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>tx power [mW]</p>
   </td>
</tr>
<tr>
   <td><a href="org.mixim.examples.CSMAMac.PhyMacHost.html">node</a>.<a href="org.mixim.examples.CSMAMac.PhyMacNic.html">nic</a>.<a href="org.mixim.modules.mac.CSMAMacLayer.html">mac</a>.contentionWindow</td>
   <td width="100">
      <i>double</i>
   </td>
   <td width="120"></td>
   <td>
<p>contention window</p>
   </td>
</tr>
</table>
<h3 class="subtitle">Source code:</h3>
<pre class="src"><span style="color: #808080; font-style: italic; ">//
//This example shows how to use MiXiMs CSMA protocol implementation.
//
//The network consists of a number of hosts which represent some kind of switches
//and a number of hosts which represent clients. At first they build up their
//routing tables by sending, forwarding (only switches), receiving and
//evaluating &quot;Hello World&quot; messages. After that phase the clients start randomly
//&quot;jabbering&quot; with other hosts and the switches only forward the &quot;Jabber&quot;
//messages to their destination.
//
//The phy layer uses only &quot;SimplePathlossModel&quot; as AnalogueModel and 
//&quot;SNRThresholdDecider&quot; as Decider.
//
//The omnetpp.ini contains the following configurations:
//
//- &quot;General&quot; 			- three clients in range of each other, no switch, no 
//						  propagation	delay
//- &quot;WithoutPropDelay&quot; 	- four clients and two switches whereas the switches are
//						  in range of each other and the clients are in range of at
//						  least one switch, no propagation delay
//- &quot;WithPropDelay&quot;		- same but with propagation delay
//- &quot;CollissionMac&quot;		- same configuration but the parameters for the CSMAMacLayer
//						  lead to more collisions
//- &quot;Perftest&quot;			- used with CmdEnv for performance testing (time limited)
//
</span><span style="color: #800000; font-weight: bold; ">network</span><span style="color: #000000; "> </span><span style="color: #000000; ">CSMAMac</span><span style="color: #000000; ">
{
    </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">playgroundSizeX</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">m</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// x size of the area the nodes are in (in meters)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">playgroundSizeY</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">m</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// y size of the area the nodes are in (in meters)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">playgroundSizeZ</span><span style="color: #000000; "> </span><span style="color: #000000; font-weight: bold; ">@unit</span><span style="color: #000000; ">(</span><span style="color: #000000; ">m</span><span style="color: #000000; ">); </span><span style="color: #808080; font-style: italic; ">// z size of the area the nodes are in (in meters)
</span><span style="color: #000000; ">        </span><span style="color: #000080; font-weight: bold; ">double</span><span style="color: #000000; "> </span><span style="color: #000000; ">numHosts</span><span style="color: #000000; ">; </span><span style="color: #808080; font-style: italic; ">// total number of hosts in the network
</span><span style="color: #000000; ">
        </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;bgb=$playgroundSizeX,$playgroundSizeY,white,,;bgp=10,50&quot;</span><span style="color: #000000; ">);
    </span><span style="color: #800000; font-weight: bold; ">submodules</span><span style="color: #000000; ">:
        </span><span style="color: #000000; ">world</span><span style="color: #000000; ">: </span><span style="color: #000000; ">BaseWorldUtility</span><span style="color: #000000; "> {
            </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
                </span><span style="color: #000000; ">playgroundSizeX</span><span style="color: #000000; "> = </span><span style="color: #000000; ">playgroundSizeX</span><span style="color: #000000; ">;
                </span><span style="color: #000000; ">playgroundSizeY</span><span style="color: #000000; "> = </span><span style="color: #000000; ">playgroundSizeY</span><span style="color: #000000; ">;
                </span><span style="color: #000000; ">playgroundSizeZ</span><span style="color: #000000; "> = </span><span style="color: #000000; ">playgroundSizeZ</span><span style="color: #000000; ">;
                </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;p=100,0;i=misc/globe&quot;</span><span style="color: #000000; ">);

        }
        </span><span style="color: #000000; ">connectionManager</span><span style="color: #000000; ">: </span><span style="color: #000000; ">ConnectionManager</span><span style="color: #000000; "> {
            </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
                </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;p=200,0;b=42,42,rect,yellow,,;i=abstract/multicast&quot;</span><span style="color: #000000; ">);

        }
        </span><span style="color: #000000; ">node</span><span style="color: #000000; ">[</span><span style="color: #000000; ">numHosts</span><span style="color: #000000; ">]: </span><span style="color: #000000; ">PhyMacHost</span><span style="color: #000000; "> {
            </span><span style="color: #800000; font-weight: bold; ">parameters</span><span style="color: #000000; ">:
                </span><span style="color: #000000; ">numHosts</span><span style="color: #000000; "> = </span><span style="color: #000000; ">numHosts</span><span style="color: #000000; ">;
                </span><span style="color: #000000; font-weight: bold; ">@display</span><span style="color: #000000; ">(</span><span style="color: #008000; ">&quot;p=50,50;b=42,42,rect,yellow,,;i=device/wifilaptop&quot;</span><span style="color: #000000; ">);

        }
    </span><span style="color: #800000; font-weight: bold; ">connections</span><span style="color: #000000; "> </span><span style="color: #800000; font-weight: bold; ">allowunconnected</span><span style="color: #000000; ">:
                         </span><span style="color: #808080; font-style: italic; ">// all connections and gates are to be generated dynamically
</span><span style="color: #000000; ">
}

</span></pre>
   <hr><p class="footer"><a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top"><img src="by-sa.png"></a> This documentation is released under the <a href="http://creativecommons.org/licenses/by-sa/3.0" target="_top">Creative Commons license</a></p>
   </body>
</html>
